

class indexx{

    constructor(path,startName,name){
        let _this=this;
       let root=  qguan("root");
        let Jsr=  qguan("jsr");

        let data=root.findData("webReactServer.jsr")

        data.then(   (data1)=>{
            let jsr =new Jsr();
            jsr.loadData(data1)
            let code=  jsr.findFileByRegular(null,null,"index.html");
            if(code){
                let tes1=new TextDecoder();
                let buff=new Uint8Array(code);
                let txt= tes1.decode(buff);
                _this.text=txt;

            }else {
                throw name+'包没有找到'+value +'文件';
            }
        } )
    }
    run(request,res,req){

        res.write( this.text)
        res.end();
    }
}
export default class SaveIndex{
    run(path,startName,name){
      let index=  new indexx(path,startName,name)

        qguan(name,index,null,"save")
    }
}
